// 简陋响应式
// 监听单个属性
let price = 5;
let quantity = 2;
let total = 0;

function effect() {
  total = price * quantity;
}
effect();
console.log(total); // 10

price = 20;
effect();
console.log(total); // 40
